package com.apexedu.eas.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.apexedu.eas.annotation.Query;
import com.apexedu.eas.entity.Gxxs0101;
import com.apexedu.eas.entity.Tblog;
import com.apexedu.eas.entity.TjxXslqxx;
import com.apexedu.eas.entity.TyxXsyshj;
import com.apexedu.framework.util.Pager;


@Repository
public class TjxXslqxxDao extends BasisDao<TjxXslqxx, Long>  {
		
	
	@Query(value = " from TjxXslqxx where ksh = ? ",nativeQuery=false)
	public TjxXslqxx getXsxxByKsh(String ksh) {
		return null;
	}
	
	//收费信息
	@Query(value = "select to_char(fy.id) subid ,lx.fylx subname  from  usr_jw.tjx_xslqxx xs left join TYX_SFBZ fy on fy.zy = xs.zy left join TYX_FYLX lx on lx.id = fy.fylx where ksh = ? ")
	public List<Map<String, String>> getSfxxByKsh(String ksh) {
		return null;
	}
	
	//收费情况
	@Query(value = "select nvl(sjje,0) sjje , nvl(yshj,0) - nvl(sjje,0) wjje from TYX_XSYSHJ where ksh=? ")
	public TyxXsyshj getSfqkByKsh(String ksh) {
		return null;
	}
	
	//报道流程信息
	@Query(value = "select xs.id xsid ,xs.xm xm ,pc.pc pc,hj.hj hj ,hj.hjsx hjsx ,qk.zt zt ,qk.blsj blsj ,hj.hjsm hjsm ,hj.bldd bldd  from tjx_xslqxx xs left join  TYX_XSBLQK qk on qk.xs=xs.lqid left join  TYX_YXHJ hj on qk.hj=hj.id left join TYX_YXPC pc on pc.id=qk.pc where xs.ksh=? order by hjsx")
	public List<Map<String, String>> getBdlcxxByKsh(String ksh) {
		return null;
	}
	//获取缴费明细
	@Query(value = "select lx.fylx fylx ,nvl(fy.fy,'0') fy  from TJX_XSLQ xs left join TYX_SFBZ fy on fy.zy = xs.zy left join TYX_FYLX lx on lx.id = fy.fylx where ksh = ?  ")
	public List<Map<String, String>> getFymxByKsh(String ksh) {
		return null;
	}
	//公告列表--5条
		@Query(value = "select * from (select rownum ,t.* from tblog t,lbnewsclass l where t.category=l.id and l.fldm='XYGG' order by pubtime desc) tb where rownum<=5 ")
		public List<Tblog> getNews() {
			return null;
		}
		//公告列表--所有
		//select t.* from TBLOG t,lbnewsclass l where t.category=l.id and l.fldm='XYGG' order by pubtime desc 
		@Query(value = "select * from TBLOG order by pubtime desc ",pager=true)
		public List<Tblog> getAllNews(Pager pager) {
			return null;
		}
		//根据标题获取对应公告
		@Query(value = "select t.*,u.name userName from TBLOG t,tuser u  where \"UID\"=u.id and t.id=? ")
		public Tblog getNewById(Long id) {
			return null;
		}
		//根据公告的数量，从而确定最大页数
//		@Query(value = "select count(t.id) from TBLOG t,lbnewsclass l where t.category=l.id and l.fldm='XYGG' ",count=true)
		@Query(value = "select count(id) from TBLOG  ",count=true)
		public Integer getCount() {
			return null;
		}
		//更新校园公告的访问次数
		@Query(value = "update tblog set visits=(visits+1) where id=? ",update=true)
		public Integer updateVists(Long id){
			return null;
		}
		//公告列表--新生须知
		@Query(value = "select  * from TBLOG where Category in (select id　from lbnewsclass where fldm = 'XSXZ')")
		public List<Tblog> getXSXZ() {
			return null;
		}
		
		//公告列表--校内站点推荐
		@Query(value = "select  * from TBLOG where Category in (select id　from lbnewsclass where fldm = 'XNZDTJ')")
		public List<Tblog> getXNZDTJ() {
			return null;
		}
		
		//公告列表--了解校园
		@Query(value = "select  * from TBLOG where Category in (select id　from lbnewsclass where fldm = 'LJXY')")
		public List<Tblog> getLJXY() {
			return null;
		}
}
